package com.example.springdemo.domain.base;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * BasePageReq
 *
 * @author wenguang
 * @date 2020/11/27 17:41
 */
@Data
@ApiModel(description = "分页请求实体")
public class BasePageReq<T> implements Serializable {

    private static final long serialVersionUID = 3285575762875370027L;

    /**
     * 页面容量
     */
    @ApiModelProperty(value = "分页参数", required = true)
    @NotNull(message = "【分页参数】不能为空")
    private Page<T> page;

    /**
     * 请求实体
     */
    @Valid
    @ApiModelProperty("请求实体")
    private T data;

}
